package com.silverbox.shopper.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.silverbox.shopper.entity.BusinessWhiteList;

public interface BusinessWhiteListMapper {
	int deleteByPrimaryKey(Integer id);

	int insert(BusinessWhiteList record);

	int insertSelective(BusinessWhiteList record);

	BusinessWhiteList selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(BusinessWhiteList record);

	int updateByPrimaryKey(BusinessWhiteList record);

	/**
	 * 根据门店id和业务编码查询是否开通白名单
	 * 
	 * @param storeId
	 * @param code
	 * @return
	 */
	Integer getIsOpenWhiteBusiness(Integer storeId, String code);

	/**
	 * 获取店铺白名单配置
	 * @param storeId
	 * @param shopperId
	 * @param code 
	 */
	List<BusinessWhiteList> getShopperBusinessWhiteList(@Param("storeId")Integer storeId,@Param("shopperId") Integer shopperId,@Param("code") String code);

}